<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
 session_start();
 include("../main/function.php");
 include("../main/ShowPage.class.php");
 include("../main/islogin.php");
 $db=new Db();
 $teacher_id=$_GET['teacher_id'];
 
 
 $action=$_GET['action'];
 if('a'==$action){
    $db->query("update teacher_user set state='0' WHERE id=$teacher_id");
 	echo '<script>alert("禁用成功");history.back()</script>';
 }else if('b'==$action){
    $db->query("update teacher_user set state='1' WHERE id=$teacher_id");
 	echo '<script>alert("启用成功");history.back()</script>';
 }else{
 	$db->query("DELETE FROM teacher_user WHERE id=$teacher_id");
 	echo '<script>alert("删除成功");history.back()</script>';
 } 
?>